var dengLu =document.querySelector('.dengLu');
var account =document.querySelector('.account');
var password =document.querySelector('.password');
var tip_one =document.querySelector('.tip_one');
var tip_two =document.querySelector('.tip_two');
var first = document.querySelector('.first');
var second =document.querySelector('.second');
//点击输入框会有相应样式的变化，用到了失去焦点的事件
account.onclick = function(){
      first.style.borderColor = 'red';
        account.onblur = function(){
            first.style.borderColor = 'black';
      };
};
password.onclick = function(){
      second.style.borderColor = 'red';
        password.onblur = function(){
            second.style.borderColor = 'black';
      };
};
//登录页面的功能
dengLu.onclick =function(){
    if(password.value =='' || account.value ==''){
        tip_one.style.display = 'block';
        account.onclick = function(){
            tip_one.style.display = 'none';
        };
        password.onclick = function(){
            tip_one.style.display = 'none';
        };
    }
}